<#assign css></#assign><#assign js>
</#assign>
<#import "/admin/common/home.html" as home>
<#import "/admin/common/tree.html" as tree>
<#escape x as (x)!"">
<@home.home pagecss=css pagejs=js>
<@home.tree />
<form action="list" id="pageListForm" method="post" class="form-inline">
	<div class="search">
		<div class="form-group">
			<input type="text" id="tree-search-input" class="form-control" placeholder="请输入部门名称" />
		</div>
		<div class="form-group">
			<a href="javascript:;" class="btn btn-search" id="tree-search-btn">查询</a>
		</div>
	</div>
	
	<div class="main-container">
		<div class="toolbar">
			<a href="javascript:;" class="btn btn-primary" onclick="admin.dialog(this);" data-width="680" data-height="500" data-url="form" data-title="新增部门">新增部门</a>
		</div>
		<@tree.treeTable searchBtnId="tree-search-btn" searchInputId="tree-search-input" >
		<table class="table table-bordered table-hover">
			<thead class="thead thead-more">
				<tr>
					<th>部门名称</th>
					<th class="ui-td-oper" width="30%">操作</th>
				</tr>
			</thead>
			<tbody class="tbody mod-tbody">
				<#list list as item>
				<tr data-tt-key="${item.name}" data-tt-id="${item.code}" data-tt-parent-id="${item.parent}">
					<td>${item.name}</td>
					<td class="ope-color">
						<a href="javascript:;" class="ui-ico-tips ui-ico-edit" onclick="admin.dialog(this);" data-width="680" data-height="500" title="编辑" data-url="form?id=${item.id}" data-title="编辑部门">编辑</a> 
						<a href="javascript:;" class="ui-ico-tips ui-ico-delete" onclick="tab.del(this);" title="删除" 
                        	data-id=${item.id} data-url="delete" data-tips="确定删除该部门及下级部门吗？">删除</a> 
                        <a href="javascript:;" class="ui-ico-tips ui-ico-edit" onclick="admin.dialog(this);" data-width="680" data-height="500" title="新增下级部门" data-url="form?parent=${item.code}" data-title="新增下级部门">新增下级部门</a>
                        <a href="javascript:;" class="ui-link-edit" onclick="admin.iframe(this);" data-width="680" data-height="500" data-url="/admin/oplog/list/object?objectAlias=SysDept&objectId=${item.id}" data-title="操作日志">操作日志</a>
					</td>
				</tr>
				</#list>
			</tbody>
		</table>
		</@tree.treeTable>
	</div>
</form>
</@home.home>
</#escape>